package com.goldmantis.alitrip.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.goldmantis.alitrip.common.BaseService;
import com.goldmantis.alitrip.mapper.SysLogMapper;
import com.goldmantis.alitrip.pojo.SysLog;
import com.goldmantis.alitrip.pojo.SysUser;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.net.SyslogAppender;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author:Shmily
 * @Description:
 * @Date:Create in 10:57 2018/2/26
 */
@Service
public class SysLogService extends BaseService<SysLog> {

    @Autowired
    private SysLogMapper sysLogMapper;


    @Override
    public PageInfo<SysLog> pageList(SysLog sysLog, Integer offset, Integer limit) {
        PageHelper.startPage(offset,limit);
        List<SysLog> sysLogs = this.sysLogMapper.getCustom(sysLog);
        return new PageInfo(sysLogs);
    }
}
